package com.atguigu.userprofile.common.dao

import com.atguigu.userprofile.common.bean.TaskInfo
import com.atguigu.userprofile.common.util.MySQLUtil

object TaskInfoDAO {

  def getTaskInfoById(taskId:String):TaskInfo={
      val sql:String = s" select  * from task_info tk where id='$taskId'"

    val maybeTaskInfo: Option[TaskInfo] = MySQLUtil.queryOne(sql, classOf[TaskInfo], true)
    if(maybeTaskInfo!=None) {
      maybeTaskInfo.get
    }else{
      null
    }
  }

}
